//@login & register
const express = require('express');
//创建路由对象
const router = express.Router();

//导入处理函数模块
const adminHandler = require('../../models/admin')

//$route POST api/users/test
//@desc 返回请求的json数据
//@access public
//登录
router.post('/register', adminHandler.register)

//$route POST api/users/test
//@desc 返回请求的json数据
//@access public
//注册
router.post('/login', adminHandler.login)

module.exports = router;